<template>
	<view class="content">
		<view class="title">{{detail.title}}</view>
    <view class="u-flex p p1">维修类型：{{detail.repair_type_text}}</view>
    <view class="u-flex p p2">维修时间：{{detail.start_time}} ~ {{detail.end_time}}</view>
    <view class="u-flex p3">
      <span class="lab">维修描述：</span>
      <rich-text class="text" :nodes="detail.content"></rich-text>
    </view>
	</view>
</template>

<script>
  const cleanListsApi = "api/clean.index/lists";// 保洁---房间列表
  const cleanLoginApi = "api/clean.index/login"; // 登录
  const cleanConfirmApi = "api/clean.index/confirm"; // 设置打扫成功
  const cleaningApi = "api/clean.index/cleaning"; // 设置打扫中
  const cleanRoomTypeListApi = "api/clean.index/roomTypeList"; // 房间类型
  const repairReportListApi = "api/engineer.repair_report/repairReportList"; //获取我的报修列表（维修工程师调用）
  const updateRepairReportApi = "api/engineer.repair_report/updateRepairReport"; // 更新维修状态（工程师调用）
  const repairReportListConfigApi = "api/engineer.repair_report/repairReportListConfig"; // 获取我的报修列表 刷选配置（维修工程师调用）
  
	export default {
		data() {
			return {
				detail:{
          content:'1111', // 描述
          img:'', // 图片
          title:'酒店房间名称', // 房屋类型
          start_time:'2024-11-25', // 开始时间
          end_time:'2024-11-26', // 结束时间
          repair_type_text:'修复', // 维修类型
        }
			}
		},
		onShow() {
      
		},
    onLoad(){
      
    },
		methods: {
      login(){
        this.ajax('POST',cleanLoginApi, {
          account: this.account,
          password:this.password,
        },res=>{
          this.web = 1;
          console.log('登录', res)
          this.user_type = res.userinfo.user_type
          uni.setStorageSync('token', res.userinfo.token);
          uni.setStorageSync('user_type', res.userinfo.user_type);
          uni.setStorageSync('userinfo', JSON.stringify(res.userinfo));
          this.getList()
          this.getShaixuan();
          uni.showTabBar()
        })
      },
      ajax(method, url, data, fun){
        uni.request({
            url: this.http+url, //仅为示例，并非真实接口地址。
            data: data,
            method:method,
            header: {
                'token': uni.getStorageSync('token') || '' //自定义请求头信息
            },
            success: (res) => {
              console.log(res.data);
              this.text = 'request success';
              if(res.data.code === 1){
                fun(res.data.data)
              }else if(res.data.code === 401){
                this.web = 0
              }
            }
        });
      },
      
		},
    onReachBottom(){
      
    }
	}
</script>

<style lang="less">
  *{box-sizing: border-box;}
  body,/deep/.uni-page-body{background-color: #fff;}
  .content{
    padding: 40rpx 30rpx;
    .title{font-size: 36rpx; margin-bottom: 20rpx;}
    .p{margin-bottom: 20rpx; font-size: 32rpx;}
    .lab,.text{font-size: 32rpx;}
  }
</style>
